feat(platform): add source=agents baggage to guardrails trace headers#1770
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an agents source marker into trace context headers for Guardrails evaluations so downstream services can attribute guardrails traffic to the agents runtime, and bumps the uipath-platform dependency/version to include this behavior across the SDK.
Changes:
- Passes
extra_baggage=["source=agents"]intobuild_trace_context_headers()fromGuardrailsService.evaluate_guardrail(). - Bumps
uipath-platformfrom0.1.77to0.1.78and updatesuipath’s dependency constraint accordingly. - Regenerates
uv.lockfiles (including updatedexclude-newermetadata and theuipath-platformversion entry).
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/uipath-platform/src/uipath/platform/guardrails/_guardrails_service.py | Adds source=agents baggage to guardrails trace headers. |
| packages/uipath-platform/pyproject.toml | Bumps uipath-platform version to 0.1.78. |
| packages/uipath-platform/uv.lock | Lockfile update reflecting 0.1.78 and regenerated exclude-newer metadata. |
| packages/uipath/pyproject.toml | Updates uipath-platform dependency minimum to 0.1.78. |
| packages/uipath/uv.lock | Lockfile update reflecting 0.1.78 and regenerated exclude-newer metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ) | ||
| # Include trace context headers for server-side span correlation | ||
| trace_headers = build_trace_context_headers() | ||
| trace_headers = build_trace_context_headers(extra_baggage=["source=agents"]) |
valentinabojan
approved these changes
Jun 29, 2026
Comment on lines
126
to
128
| # Include trace context headers for server-side span correlation | ||
| trace_headers = build_trace_context_headers() | ||
| trace_headers = build_trace_context_headers(extra_baggage=["source=agents"]) | ||
| request_headers = {**(spec.headers or {}), **trace_headers} |
… headers Pass extra_baggage=["source=agents"] to build_trace_context_headers() in GuardrailsService so the server can distinguish guardrail validation requests originating from the agents runtime. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4e33784 to
4b885b5
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
extra_baggage=["source=agents"]tobuild_trace_context_headers()inGuardrailsService.evaluate_guardrail()so the server can identify requests originating from the agents runtimeuipath-platformto 0.1.78 and updatesuipathdependency accordinglyTest plan
extra_baggageparam is an internal detail not asserted by testsbuild_trace_context_headersalready accepts theextra_baggageparameter🤖 Generated with Claude Code